<%@ page import="java.util.List" %>
<%@ page import="dao.*" %>
<%@ page import="proto.*" %>
<%@ page import="java.sql.SQLException" %><%--
  Created by IntelliJ IDEA.
  User: Superb
  Date: 2022/10/14
  Time: 18:12
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" %>
<html>
<head>
    <title>school</title>
    <style>
        @import "css/table.css";
        @import "css/navigate.css";
        @import "css/button.css";
        @import "css/barcon.css";
        @import "css/header.css";
        /*.left span {*/
        /*    cursor: pointer;*/
        /*    display: inline-block;*/
        /*    position: relative;*/
        /*    transition: 0.5s;*/
        /*}*/

        /*.left span:after {*/
        /*    content: '«';*/
        /*    position: absolute;*/
        /*    color: rgba(255, 255, 255, 0);*/
        /*    left: -3px;*/
        /*    top: 10%;*/
        /*}*/

        /*.left:hover span {*/
        /*    padding-left: 30%;*/
        /*}*/

        /*.left span:after {*/
        /*    color: white;*/
        /*}*/

    </style>
    <script src="js/jquery-2.2.3.min.js"></script>
    <script src="js/page.js"></script>
</head>
<body onload="get_info()">
<%
    int school = 1046;
    typeDao td = new typeDao();
    List<type> typeList = null;
    try {
        typeList = td.SearchList(school);
    } catch (SQLException e) {
        e.printStackTrace();
    }
    assert typeList != null;
%>
<div class="header" style="color: dodgerblue">
    <img src="./images/YZY协会logo 透明.png" alt="援之缘支教协会会标">
    <h1 style="text-align: center; font-family: 华文新魏; font-size: 50px">援之缘支教协会图书管理系统</h1>
    <p style="text-align: center; font-family: 华文行楷; font-size: 30px">——知雨书舍</p>
</div>
<form action="${pageContext.request.contextPath}/returnServlet">
    <%
            int admin = 25;
    %>
    <input type="hidden" name="admin" value="<%=admin%>">
    <button type="submit" class="button_return" style="vertical-align:middle"><span>返回</span></button>
</form>

<div class="back">
    <div class="left" id="n">
        <a href="school.jsp?admin=25&school=<%=school%>">捐赠者名单</a>

        <a href="#">图书分类 »</a>
        <div>
            <%for (type t : typeList) {%>
            <a style="text-align:right;padding:10px" href="book.jsp?admin=25&school=<%=school%>&type=<%=t.get_id()%>"><%=t.get_name()%>类&emsp;<%=t.get_num()%></a>
            <%} %>
        </div>
    </div>

    <div class="right">
        <table style="width: 50%">
            <caption>捐赠者名单</caption>
            <thead>
            <tr id="list">
                <th class="table_2 th">名字</th>
                <th class="table_2 th">捐赠数量</th>
            </tr>
            </thead>
            <tbody id="listbody">
            <%
                donatorDao dd = new donatorDao();
                List<donator> donatorList = null;
                try {
                    donatorList = dd.Search(school);
                } catch (SQLException e) {
                    e.printStackTrace();
                }
                assert donatorList != null;
                for (donator d : donatorList) {
            %>
            <tr>
                <td><%=d.get_name()%></td>
                <td><%=d.get_num()%></td>
            </tr>
            <%} %>
            </tbody>
        </table><br/>
        <table id="search">
            <tbody>
            <tr>
                <td>
                    <div class="barcon">
                        <ul>
                            <li>
                                <span id="total_tr"></span>
                                <input id="paging" type="text" value="" readonly="true"/>
                                <span id="total_page"></span>
                            </li>
                            <li><a href="#" id="firstPage">&lt;&lt;</a></li>
                            <li><a href="#" id="prePage">&lt;</a></li>
                            <li><a href="#" id="nextPage">&gt;</a></li>
                            <li><a href="#" id="lastPage">&gt;&gt;</a></li>
                            <li>
                                <span>前往</span>
                                <input id="input_page" type="text" value="" autocomplete="off"/>
                                <span>页</span>
                            </li>
                        </ul>
                    </div>
                </td>
            </tr>
            </tbody>
        </table><br/>
    </div>
</div>

<div class="footer">
    <p>Copyright &copy 华中科技大学计算机科学与技术学院软件工程小组“三个老板” 版权所有</p>
    <p>联系我们：1472756570@qq.com</p>
</div>
</body>
</html>

